<?php


namespace app\admin\model;


use think\Model;

class SystemPlanningTasks extends Model
{

    protected $table = 'system_planning_tasks' ;

    protected $autoWriteTimestamp = true;

    //验证任务名
    public static function check_name($data)
    {
        $check = self::where('name',$data['name'])-findOne();
        if($check){
            return false;
        }
        return true;
    }

    //验证执行命令
    public static function check_cmd($data)
    {
        $check = self::where('cmd',$data['cmd'])-findOne();
        if($check){
            return false;
        }
        return true;
    }

}